<admintpl file="header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="javascript:;">充值记录</a></li>
			<!--<li><a href="{:U('AdminRecharge/add',array('id'=>empty($item['id'])?'':$item['id']))}" target="_self">充值</a></li>-->
		</ul>
        <form class="well form-search" id="form_search" method="post" action="{:U('AdminRecharge/index')}">
            <if condition="$is_manager">
                <select name="s_rid">
                    <option value="">请选择物流公司</option>
                    <foreach name="logistics_list" item="litem">
                        <option value="{$litem['id']}" <if condition="$s_rid == $litem['id']">selected</if>>{$litem.logistics_name}</option>
                    </foreach>
                </select>
                <select name="s_admin_id" style="margin:0px;">
                    <option value="">请选择操作用户</option>
                    <foreach name="admin_list" item="litem">
                        <option value="{$litem['id']}" <if condition="$s_admin_id == $litem['id']">selected</if>>{:$litem['user_nicename'].($litem['logistics_name']?'['.$litem['logistics_name'].']':'')}</option>
                    </foreach>
                </select>
            </if>
            <select name="s_status">
                <option value="">请选择充值状态</option>
                <option value="1" <if condition="$s_status == 1">selected</if>>待审核</option>
                <option value="2" <if condition="$s_status == 2">selected</if>>充值成功</option>
                <option value="3" <if condition="$s_status == 3">selected</if>>充值失败</option>
            </select>
            <input type="text" name="s_start_time" id="s_start_time" value="<php> echo date('Y-m-d H:i',$s_start_time);</php>" class="js-datetime" placeholder="开始时间" >
            至
            <input type="text" name="s_end_time" id="s_end_time" value="<php> echo date('Y-m-d H:i',$s_end_time);</php>" class="js-datetime" placeholder="结束时间">
            <input type="submit" class="btn btn-primary" value="搜索" />
            <input type="hidden" name="s_download" id="s_download" value="0"/>
            <a class="btn btn-primary" style="float: right;margin-right:15px;margin-bottom:10px;" href="javascript:downloadExcel(1);">导出报表</a>

        </form>
		<form class="js-ajax-form" action="" method="post">

			<table class="table table-hover table-bordered table-list">
                <thead>
                <tr>
                    <th width="50">操作用户</th>
                    <th width="50">用户电话</th>
                    <th width="50">物流公司名称</th>
                    <th width="50">充值金额</th>
                    <th width="100">赠送金额</th>
                    <th width="50">充值后余额</th>
                    <th width="50">备注</th>
                    <th width="50">状态</th>
                    <th width="50">创建时间</th>
                    <if condition="$admin['id'] == 10">
                    <!--<th width="70">{:L('ACTIONS')}</th>-->
                    </if>
                </tr>
                </thead>
                <foreach name="list" item="vo">
                    <tr>
                        <td>{$vo.user_nicename}</td>
                        <td>{$vo.user_phone}</td>
                        <td>{:$vo['upper_logistics_name']?$vo['upper_logistics_name'].' => ':''}{$vo.logistics_name}</td>
                        <td>{$vo.price}</td>
                        <td>{$vo.general_price}</td>
                        <td>{$vo.after_balance}</td>
                        <td>{$vo.desc}</td>
                        <td>
                            <if condition="$vo['status'] == 1">
                                待审核
                            <elseif condition="$vo['status'] == 2"/>
                                充值成功
                            <elseif condition="$vo['status'] == 3"/>
                                充值失败
                            </if>
                        </td>
                        <td>{:date("Y-m-d H:i:s",$vo['create_time'])}</td>
                        <if condition="$admin['id'] == 10">
                        <!--<td>-->
                            <!--<if condition="$vo['status'] == 1">-->
                                <!--<a href="{:U('AdminRecharge/op',array('recharge_id'=>$vo['id'],'status'=>2))}" onclick="return confirm('确定通过？')">审核通过</a> |-->
                                <!--<a href="{:U('AdminRecharge/op',array('recharge_id'=>$vo['id'],'status'=>3))}" onclick="return confirm('确定不通过？')">审核不通过</a>-->
                            <!--</if>-->
                        <!--</td>-->
                        </if>
                    </tr>
                </foreach>

			</table>

			<div class="pagination">{$page}</div>
		</form>
	</div>
	<script src="__PUBLIC__/js/common.js?1"></script>
	<script>
		function refersh_window() {
			var refersh_time = getCookie('refersh_time');
			if (refersh_time == 1) {
				window.location = "{:U('AdminRecharge/index',$formget)}";
			}
		}

	</script>
</body>
</html>